package buzhidao;
class Animal{
    private String name;
    private int age;
    public final String color="金黄色";
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name=name;
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age=age;
    }
}
    class Dog extends Animal{
}

public class ExtendsTest {
    public static void main(String[]args){
        Dog dog=new Dog();
        dog.setName("金毛");
        dog.setAge(4);
        System.out.println("名字："+dog.getName()+",年龄："+dog.getAge()+","+dog.color);
    }
    
}
